package com.speily.cloud.account.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ConfigController
 *
 * @author : SPL
 * @since : 2021-04-20 09:44
 **/
@RestController
@RequestMapping("/config")
@RefreshScope
public class ConfigController {

    @Value("${user1.name}")
    private String name;

    /**
     * http://localhost:8081/account/config/get
     */
    @RequestMapping("/get")
    public String get() {
        return name;
    }


}
